Skip to content

Conversation

@sjha4
Copy link
Member

@sjha4 sjha4 commented Nov 18, 2025

Add some nil UUID handling. This will work independently of the Katello changes : Katello/katello#11569 which prevents katello from sending this nil values by switching to use subscription UUID as the host identifier.

To test,
Register a host to a Smart proxy.
In console, empty out the content facet UUID.
Sync the smart proxy.

The sync should succeed. Try normal workflows like 2 registered hosts with one nil UUID and another with UUID etc.

Copy link
Member

@ianballou ianballou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking fine, just some test questions.

]

put '/update_hosts', { 'hosts' => hosts }
assert last_response.ok?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test doesn't verify that no hosts were added to the DB.

.map { |repo| repo['repository'] }
end

def update_host_repositories(uuid, repositories)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a test with nil UUIDs in test/container_gateway_backend_test.rb ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Used claude and it added some tests that cover some blank uuid cases.. 🤖

Copy link
Member

@ianballou ianballou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Tested syncing & pull content from the smart proxy via a registered cert host just to be safe.

@sjha4 sjha4 merged commit f7b43fa into Katello:main Dec 2, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants